/* test_hc256.c
**
** Copyright (c) 2007, Meadhbh S. Hamrick
** All rights reserved.
** 
** Redistribution  and  use  in  source  and  binary  forms,  with  or  without
** modification, are permitted provided that the following conditions are met:
** 
**  * Redistributions of  source code must  retain the above  copyright notice,
**    this list of conditions and the following disclaimer.
** 
**  * Redistributions in binary form must reproduce the above copyright notice,
**    this list of conditions and the following disclaimer in the documentation
**    and/or other materials provided with the distribution.
** 
**  * Neither the  name of  Project Meadhbh  nor the names of  its contributors
**    may be used  to endorse  or promote  products derived from this  software
**    without specific prior written permission.
** 
** THIS SOFTWARE IS PROVIDED BY  THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
** AND ANY  EXPRESS OR IMPLIED WARRANTIES,  INCLUDING, BUT NOT  LIMITED TO, THE
** IMPLIED WARRANTIES  OF MERCHANTABILITY AND FITNESS FOR  A PARTICULAR PURPOSE
** ARE DISCLAIMED.  IN NO  EVENT SHALL THE  COPYRIGHT OWNER OR  CONTRIBUTORS BE
** LIABLE  FOR  ANY  DIRECT,   INDIRECT,  INCIDENTAL,  SPECIAL,  EXEMPLARY,  OR
** CONSEQUENTIAL  DAMAGES  (INCLUDING,  BUT  NOT  LIMITED  TO,  PROCUREMENT  OF
** SUBSTITUTE GOODS  OR SERVICES;  LOSS OF USE,  DATA, OR PROFITS;  OR BUSINESS
** INTERRUPTION)  HOWEVER CAUSED  AND ON  ANY THEORY  OF LIABILITY,  WHETHER IN
** CONTRACT,  STRICT LIABILITY,  OR  TORT (INCLUDING  NEGLIGENCE OR  OTHERWISE)
** ARISING IN ANY WAY  OUT OF THE USE OF THIS SOFTWARE,  EVEN IF ADVISED OF THE
** POSSIBILITY OF SUCH DAMAGE.
** 
** $Id: test_hc256.c 66 2007-11-08 07:18:51Z msh.mobile $
*/

/** \file test_hc256.c
**  \brief Test HC256 Stream Cipher
**
** This file  implements the tests that are  referenced in test_crypto.c.
** It is  assumed that the initalization  function suite_hc256_init() will
** be  called before any  of the  test_*() functions.  The initialization
** function does  all the "heavy  lifting" of creating  contexts, setting
** the key, encrypting and so forth.  The individual tests simply compare
** output and intermediate values with known good test values.
** 
** "Canonical" test  vectors for HC256 are  hard to come by.  In 1999, RSA
** published an internet  draft with a single test  vector. In 1994, test
** vectors were published on sci.crypt. Even the Wikipedia has a few test
** vectors.
** 
** Numerous  tests for cloning  behavior are  performed. Cloning  is used
** extensively in  these tests.  If it doesn't  work, then  it's unlikely
** that anything  will work. But we perform  a number of tests  to see if
** there are particular problems with cloning before or after various hc256
** function calls.
** 
** We test the mc_stream_hc256_clear() function by testing to see if the 
** content of the context is set to zero.
*/

/* Macro Definitions */
#define MC_STREAM_HC256_TEST_MAX_CONTEXTS 20
#define MC_STREAM_HC256_TEST_MAX_VECTORS 7

/* File Includes */
#include <string.h>
#include "mutil.h"
#include "mcrypto/hc256.h"
#include "test_hc256.h"
#include <CUnit/CUnit.h>
#include <stdlib.h>
#include <stdio.h>

/* Typedefs, Structs, Unions, Enums, etc. */

/* Static Function Prototypes */

/* Variable Declarations */
tMCHc256 hc256_actual_contexts [ MC_STREAM_HC256_TEST_MAX_CONTEXTS ];
tMCHc256 hc256_contexts [ MC_STREAM_HC256_TEST_MAX_CONTEXTS ];
uint8_t hc256_actual_outputs [ MC_STREAM_HC256_TEST_MAX_VECTORS ];
uint8_t hc256_outputs [ MC_STREAM_HC256_TEST_MAX_VECTORS ];

/* Function Definitions */

/** \fn int suite_hc256_init( void )
**  \brief Calls various hc256 functions in preparation for value checking.
**  \returns 0 (success)
** 
** This is  the function where "rubber  meets the road." We  call all the
** functions  under test  in this  initialization function  and  in later
** tests simply compare the values we get with known good values.
** 
** The algorithm-specific  functions don't  return error codes  and don't
** check parameters. Ergo, we won't  know if there's a failure during the
** init routine's run. We get that info later in the test_*()
** functions.
*/

int suite_hc256_init() {
  return( 0 );
}

/** \fn void test_hc256_rfc_vectors( void )
**  \brief Tests for compatibility with test vectors provided in RFC1319
** 
*/

void test_hc256_vectors( ) {
}

/** \fn void test_mc_stream_hc256_clone( void )
**  \brief Tests our ability to clone hash contexts
** 
** In this  test, we  look to  see if our  ability to  copy a  context is
** dependent on  the state of the  context. I would be  very surprised if
** this fails.
*/

void test_mc_stream_hc256_clone( ) {
}

/** \fn void test_mc_stream_hc256_clear( void )
**  \brief Tests to ensure that sensitive data is cleared
** 
*/

void test_mc_stream_hc256_clear( ) {
}

/** \fn void test_mc_stream_hc256_initialize( void )
**  \brief Tests the ability to initiailze a newly allocated hashing context. 
** 
*/

void test_mc_stream_hc256_initialize( ) {
}

/** \fn void test_mc_stream_hc256_update( void )
**  \brief Tests the hash update function
** 
*/

void test_mc_stream_hc256_update( ) {
}

/** \fn void test_mc_stream_hc256_keystream( void )
**  \brief Tests the hash update function
** 
*/

void test_mc_stream_hc256_keystream( ) {
}
